import Send, { Proxy } from "@/common/http";


export function createBoard (data) {

    return Send({
        url: Proxy("/api/board/add"),
        method: "post",
        data
    })
}


export function findBoard (data) {

    return Send({
        url: Proxy("/api/board/find"),
        method: "get",
        data
    })
}

export function findBoardById (id) {

    return Send({
        url: Proxy("/api/board/detail"),
        method: "get",
        data: {id}
    })
}


export function removeUnit (id) {

    return Send({
        url: Proxy("/api/board/removeUnit"),
        method: "post",
        data: { id }
    })
}

export function syncBoard (data) {

    return Send({
        url: Proxy("/api/board/sync"),
        method: "get",
        data
    })
}


export function syncBoardToday (code) {

    return Send({
        url: Proxy("/api/board/sync-today"),
        method: "get",
        data: {code}
    })
}
